home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / interp / tclStruct1.2.tar.gz / tclStruct1.2.tar / tclStruct1.2 / Makefile.in < prev    next >
Makefile  |  1995-09-15  |  10KB  |  323 lines

  1. #
  2. # This file is a Makefile for tclStruct.  If it has the name "Makefile.in"
  3. # then it is a template for a Makefile;  to generate the actual Makefile,
  4. # run "./configure", which is a configuration script generated by the
  5. # "autoconf" program (constructs like "@foo@" will get replaced in the
  6. # actual Makefile.
  7. #
  8. # @(#) Makefile.in 1.3 95/09/15 12:21:06
  9.  
  10. #----------------------------------------------------------------
  11. # Things you can change to personalize the Makefile for your own
  12. # site (you can make these changes in either Makefile.in or
  13. # Makefile, but changes to Makefile will get lost if you re-run
  14. # the configuration script).
  15. #----------------------------------------------------------------
  16.  
  17. # Default top-level directories in which to install architecture-
  18. # specific files (exec_prefix) and machine-independent files such
  19. # as scripts (prefix).  The values specified here may be overridden
  20. # at configure-time with the --exec-prefix and --prefix options
  21. # to the "configure" script.
  22.  
  23. prefix        = @prefix@
  24. exec_prefix    = @exec_prefix@
  25.  
  26. # The following definition can be set to non-null for special systems
  27. # like AFS with replication.  It allows the pathnames used for installation
  28. # to be different than those used for actually reference files at
  29. # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
  30. # when installing files.
  31. INSTALL_ROOT    =
  32.  
  33. # Directory from which applications will reference the library of tclStruct
  34. # scripts (note: this directory is not hard-coded into the binary)
  35. STRUCT_LIBRARY    = $(prefix)/lib/tclstruct
  36.  
  37. # Path name to use when installing library scripts:
  38. SCRIPT_INSTALL_DIR    = $(INSTALL_ROOT)$(STRUCT_LIBRARY)
  39.  
  40. # Directory in which to install the archive libtclstruct.a:
  41. LIB_INSTALL_DIR    = $(INSTALL_ROOT)$(exec_prefix)/lib
  42.  
  43. # Directory in which to install the program tclsh:
  44. BIN_INSTALL_DIR    = $(INSTALL_ROOT)$(exec_prefix)/bin
  45.  
  46. # Directory in which to install the include file tclStruct.h:
  47. INCLUDE_INSTALL_DIR    = $(INSTALL_ROOT)$(prefix)/include
  48.  
  49. # Top-level directory in which to install manual entries:
  50. MAN_INSTALL_DIR    = $(INSTALL_ROOT)$(prefix)/man
  51.  
  52. # Directory in which to install manual entry for tclsh:
  53. MAN1_INSTALL_DIR    = $(MAN_INSTALL_DIR)/man1
  54.  
  55. # Directory in which to install manual entries for Tcl's C library
  56. # procedures:
  57. MAN3_INSTALL_DIR    = $(MAN_INSTALL_DIR)/man3
  58.  
  59. # Directory in which to install manual entries for the built-in
  60. # Tcl commands:
  61. MANN_INSTALL_DIR    = $(MAN_INSTALL_DIR)/mann
  62.  
  63. # Which version of Tcl to use and/or link against.
  64. TCLSH        = @TCLSH@
  65. TCLLIBRARY    = @TCLLIBRARY@
  66.  
  67. # Additional libraries to use when linking.  The "LIBS" part will be
  68. # replaced (or has already been replaced) with relevant libraries as
  69. # determined by the configure script.
  70. AC_LIBS        = @LIBS@
  71. MATH_LIBS    = @MATH_LIBS@
  72. SYSLIBS        = $(TCLLIBRARY) $(MATH_LIBS) $(AC_LIBS) $(DL_LIBS)
  73.  
  74. # To change the compiler switches, for example to change from -O
  75. # to -g, change the following line:
  76. CCOPTIONS    = @CCOPTIONS@
  77. CDEBUGFLAGS    = -DDEBUG=0 -DSTRUCT_MAGIC
  78.  
  79. # To disable ANSI-C procedure prototypes reverse the comment characters
  80. # on the following lines:
  81. PROTO_FLAGS    =
  82. #PROTO_FLAGS    = -DNO_PROTOTYPE
  83.  
  84. # To enable memory debugging reverse the comment characters on the following
  85. # lines.  Warning:  if you enable memory debugging, you must do it
  86. # *everywhere*, including all the code that calls Tcl, and you must use
  87. # ckalloc and ckfree everywhere instead of malloc and free.
  88. MEM_DEBUG_FLAGS    =
  89. #MEM_DEBUG_FLAGS    = -DTCL_MEM_DEBUG
  90.  
  91. # Some versions of make, like SGI's, use the following variable to
  92. # determine which shell to use for executing commands:
  93. SHELL        = /bin/sh
  94.  
  95.  
  96. INSTALL        = @INSTALL@
  97. INSTALL_DATA    = @INSTALL_DATA@
  98.  
  99. #----------------------------------------------------------------
  100. # The symbols below provide support for dynamic loading and shared
  101. # libraries.  The values of the symbols are normally set by the
  102. # configure script.  You shouldn't normally need to modify any of
  103. # these definitions by hand.
  104. #----------------------------------------------------------------
  105.  
  106. # Flags to pass to cc when compiling the components of a shared library:
  107. SHLIB_CFLAGS    = @SHLIB_CFLAGS@
  108.  
  109. # Base command to use for combining object files into a shared library:
  110. SHLIB_LD    = @SHLIB_LD@
  111.  
  112. # Suffix to use for the name of the shared library.  An empty string
  113. # means we don't know how to use shared libraries on this platform.
  114. SHLIB_SUFFIX    = @SHLIB_SUFFIX@
  115.  
  116. # Suffix to use for _any_ library.  Defaults to ".a".
  117. LIB_SUFFIX    = @LIB_SUFFIX@
  118.  
  119. # Library file(s) to include in tclsh and other base applications
  120. # in order to provide facilities needed for dynamic linking.
  121. DL_LIBS        = @DL_LIBS@
  122.  
  123. # Flags to pass to the compiler when linking object files into
  124. # an executable tclsh or tcltest binary.
  125. LD_FLAGS    = @LD_FLAGS@
  126.  
  127. #----------------------------------------------------------------
  128. # The information below is modified by the configure script when
  129. # Makefile is generated from Makefile.in.  You shouldn't normally
  130. # modify any of this stuff by hand.
  131. #----------------------------------------------------------------
  132.  
  133. COMPAT_OBJS    = @LIBOBJS@
  134. AC_CFLAGS    = @CFLAGS@
  135. AC_DEFINES    = @DEFS@
  136. AC_LDFLAGS    = @LDFLAGS@
  137. AC_LIBS        = @LIBS@
  138. RANLIB        = @RANLIB@
  139. CC        = @CC@
  140. RM        = rm -f
  141.  
  142.  
  143. #----------------------------------------------------------------
  144. # The information below should be usable as is.  The configure
  145. # script won't modify it and you shouldn't need to modify it
  146. # either.
  147. #----------------------------------------------------------------
  148.  
  149. # Leave alone.  Will be overridden for shared libraries
  150.  
  151. STD_DEFINES    = 
  152. STD_INCLUDES    = -I$(INCLUDE_INSTALL_DIR)
  153.  
  154. ALLINCLUDES    = $(STD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  155.  
  156. ALLDEFINES    = $(ALLINCLUDES) $(STD_DEFINES) $(CDEBUGFLAGS) \
  157.           $(PROTO_DEFINES) $(DEFINES) \
  158.           $(AC_DEFINES) $(MATH_FLAGS) $(GENERIC_FLAGS) \
  159.           $(PROTO_FLAGS) $(MEM_DEBUG_FLAGS)
  160.  
  161. LINTFLAGS    = $(LINTOPTS) -DLINT $(ALLINCLUDES)
  162. CFLAGS        = $(CCOPTIONS) $(AC_CFLAGS) $(SHLIB_CFLAGS) $(ALLDEFINES) $(CRUNFLAGS)
  163.  
  164. ##SYSLIBS        = $(AC_LIBS) $(DL_LIBS) -ltcl$(TCLVERSION) -lm $(DL_LIBS)
  165.  
  166. LDFLAGS        = $(CFLAGS) -L$(exec_prefix)/lib
  167.  
  168. OBJSLIB    = \
  169.     stAccess.o \
  170.     stCopy.o \
  171.     stDebug.o \
  172.     stInfo.o \
  173.     stInit.o \
  174.     stLookup.o \
  175.     stObject.o \
  176.     stRead.o \
  177.     stTrace.o \
  178.     stTrNum.o \
  179.     stTrStr.o \
  180.     stTypeDef.o \
  181.     stTypes.o
  182. OBJECTS    =  $(OBJSLIB) tclAppInit.o
  183.  
  184.  
  185. LIB_TARGET= libtclStruct$(LIB_SUFFIX)
  186. ALL_TARGETS    = tclstruct $(LIB_TARGET) library/tclIndex
  187.  
  188. all: $(ALL_TARGETS)
  189.  
  190. # Building an archive library
  191. libtclStruct.a: $(OBJSLIB)
  192.     $(RM) $@
  193.     $(AR) cr $@ $(OBJSLIB)
  194.     $(RANLIB) $@
  195.  
  196. # Building a (dynamically) loadable/shared library
  197. libtclStruct$(SHLIB_SUFFIX): $(OBJSLIB)
  198.     $(SHLIB_LD) -o libtclStruct$(SHLIB_SUFFIX) $(OBJSLIB)
  199.  
  200.  
  201. # This executable is statically linked with the tclStruct package
  202. # and is used for testing.  It is not (normally) installed.
  203. tclstruct: $(OBJECTS)
  204.     LD_RUN_PATH=$(LIB_INSTALL_DIR) $(CC) -o $@ $(LDFLAGS) $(OBJECTS) $(SYSLIBS)
  205.  
  206.  
  207. # Create the index of auxilary functions
  208. library/tclIndex: library
  209.     echo "auto_mkindex library *.tcl" | $(TCLSH)
  210.  
  211.  
  212. lint:
  213.     lint $(LINTFLAGS) $(ALLINCLUDES) tclAppInit.c $(OBJSLIB:.o=.c) $(SYSLIBS)
  214.  
  215. # There are two ways to run the tests that are part of this package.
  216. # The first (and default) method is to run the tests using the executable
  217. # we create expressly for this purpose.  The second (and prefered) method
  218. # is to dynamically load this extension into the Tcl interpreter.
  219. test: tclstruct
  220.     (cd tests; ../tclstruct all)
  221. test-dl: $(LIB_TARGET)
  222.     (cd tests; LD_LIBRARY_PATH=`pwd`:$(LIB_INSTALL_DIR) $(TCLSH) all)
  223.  
  224. install: install-binaries install-libraries install-man
  225.  
  226. install-binaries:
  227.     @for i in $(LIB_INSTALL_DIR) ; \
  228.         do \
  229.         if [ ! -d $$i ] ; then \
  230.         echo "Making directory $$i"; \
  231.         mkdir $$i; chmod 755 $$i ; \
  232.         fi; \
  233.         done;
  234.     @echo "Installing $(LIB_TARGET)
  235.     @$(INSTALL_DATA) $(LIB_TARGET) $(LIB_INSTALL_DIR)
  236.  
  237. install-libraries:
  238.     @for i in $(INCLUDE_INSTALL_DIR) $(SCRIPT_INSTALL_DIR) ; \
  239.         do \
  240.         if [ ! -d $$i ] ; then \
  241.         echo "Making directory $$i"; \
  242.         mkdir $$i; chmod 755 $$i ; \
  243.         fi; \
  244.         done;
  245.     cp tclStruct.h $(INCLUDE_INSTALL_DIR)
  246.     cp library/*.tcl library/tclIndex $(SCRIPT_INSTALL_DIR)
  247.     @echo "Installing tclStruct.h"
  248.     @$(INSTALL_DATA) tclStruct.h $(INCLUDE_INSTALL_DIR)
  249.     @for i in library/*.tcl library/tclIndex ; \
  250.         do \
  251.         echo "Installing $$i"; \
  252.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
  253.         done;
  254.     
  255. install-man:
  256.     @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
  257.         do \
  258.         if [ ! -d $$i ] ; then \
  259.         echo "Making directory $$i"; \
  260.         mkdir $$i; \
  261.         chmod 755 $$i; \
  262.         else true; \
  263.         fi; \
  264.         done;
  265.     @cd doc; for i in *.1; \
  266.         do \
  267.         echo "Installing doc/$$i"; \
  268.         $(RM) $(MAN1_INSTALL_DIR)/$$i; \
  269.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  270.             $$i > $(MAN1_INSTALL_DIR)/$$i; \
  271.         chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
  272.         done;
  273.     @cd doc; for i in *.3; \
  274.         do \
  275.         echo "Installing doc/$$i"; \
  276.         $(RM) $(MAN3_INSTALL_DIR)/$$i; \
  277.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  278.             $$i > $(MAN3_INSTALL_DIR)/$$i; \
  279.         chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
  280.         done;
  281.     @cd doc; for i in *.n; \
  282.         do \
  283.         echo "Installing doc/$$i"; \
  284.         $(RM) $(MANN_INSTALL_DIR)/$$i; \
  285.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  286.             $$i > $(MANN_INSTALL_DIR)/$$i; \
  287.         chmod 444 $(MANN_INSTALL_DIR)/$$i; \
  288.         done;
  289.  
  290. Makefile: Makefile.in
  291.     $(SHELL) config.status
  292.  
  293. depend:
  294.     makedepend $(ALLDEFINES) *.c
  295.  
  296. clean: 
  297.     $(RM) $(OBJECTS) core $(ALL_TARGETS) libtclStruct.*
  298.  
  299. distclean: clean
  300.     $(RM) Makefile config.status config.cache
  301.  
  302. #
  303. # Target to make sure that only symbols with "Tcl" prefixes are
  304. # exported.
  305. #
  306.  
  307. checkexports: $(LIB_TARGET)
  308.     -nm -p $(LIB_TARGET) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Ss]struct'
  309.  
  310. #
  311. # Target to create a proper Tcl distribution from information in the
  312. # master source directory.  DISTDIR must be defined to indicate where
  313. # to put the distribution.
  314. #
  315.  
  316. configure: configure.in
  317.     autoconf
  318. dist: configure
  319.     ./BuildPkg
  320.  
  321.  
  322. # DO NOT DELETE THIS LINE -- make depend depends on it.
  323.